﻿<!--
   Extended Silverlight Toolkit – SAMPLE CODE

   Copyright (C) 2010-2012 Xceed Software Inc.

   This program is provided to you under the terms of the Microsoft Public
   License (Ms-PL) as published at http://extendedsilverlight.codeplex.com/license

   Please purchase a commercial version of this toolkit if you are using
   it in a commercial product. The commercial versions support the project,
   and also include more features for each control, priority support,
   source code, updates, removed watermark, and a proprietary license.

   Visit http://xceed.com and follow @datagrid on Twitter.

 ===========================================================================

  === IMPORTANT NETFLIX INFORMATION ===

   This sample application accesses data from the Netflix's OData Catalog API. 
   Before you compile this sample application, you must agree to the terms and conditions 
   of the Netflix API Terms of Use agreement. 

   The agreement is available here: http://developer.netflix.com/page/Api_terms_of_use
-->

<UserControl x:Class="Xceed.Silverlight.DataGrid.Samples.RemoteDataAccessSettings"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             d:DesignHeight="300"
             d:DesignWidth="400">

    <UserControl.Resources>
        <Style x:Key="HyperlinkCatalogButtonStyle"
                TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <TextBlock Foreground="#FD9C02">
                            Netflix's OData Catalog API (Preview)
                        </TextBlock>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="HyperlinkLogoButtonStyle"
                TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Viewbox Width="175"
                                 VerticalAlignment="Center"
                                 HorizontalAlignment="Center">
                              <Canvas Height="92.983"
                                      Width="216.395">
                                            <Path Data="F1M252.395,119.512L60.483,119.512L60.483,26.529L252.395,26.529z"
                                       Fill="#FFED2A24"
                                       Height="92.983"
                                       Canvas.Left="24.483"
                                       Stretch="Fill"
                                       Canvas.Top="0"
                                       Width="191.912" />
                                            <Path Data="F1M60.482,119.512L36,119.512L36,26.529L60.482,26.529z"
                                       Fill="Black"
                                       Height="92.983"
                                       Canvas.Left="0"
                                       Stretch="Fill"
                                       Canvas.Top="0"
                                       Width="24.482" />
                                            <Path Data="F1M93.5728,52.5215L93.5728,53.2815C93.5728,53.2815,93.5688,54.6255,93.5688,55.7965C92.3978,54.5015,90.6198,52.5215,90.6198,52.5215L82.4968,52.5215L82.4968,92.8625L87.1768,96.5585L92.0598,95.9455C92.0598,95.9455,92.0788,93.8155,92.0938,92.3735C93.6928,93.6895,95.8868,95.4905,95.8868,95.4905L103.8818,94.6755L103.8818,56.6715L99.5438,52.5295z"
                                       Fill="#FF201D20"
                                       Height="44.037"
                                       Canvas.Left="46.497"
                                       Stretch="Fill"
                                       Canvas.Top="25.993"
                                       Width="21.385" />
                                            <Path Data="F1M142.7759,52.5176L128.8919,52.5176L128.8919,57.8896C128.8919,57.8896,132.5609,60.7766,133.0659,61.1736L133.0659,88.8686L137.6639,92.5576L143.2239,92.4146L143.2239,61.1686C144.2229,61.1596,147.3279,61.1386,147.3279,61.1386L147.3279,57.2256L143.1189,52.5176z"
                                       Fill="#FF201D20"
                                       Height="40.04"
                                       Canvas.Left="92.892"
                                       Stretch="Fill"
                                       Canvas.Top="25.989"
                                       Width="18.436" />
                                            <Path Data="F1M198.9121,52.5215L193.4411,52.5215L193.4411,89.6035L198.1061,93.9285L203.6281,94.3855L203.6281,56.7735L199.2191,52.5215z"
                                       Fill="#FF201D20"
                                       Height="41.864"
                                       Canvas.Left="157.441"
                                       Stretch="Fill"
                                       Canvas.Top="25.993"
                                       Width="10.187" />
                                            <Path Data="F1M226.0889,75.1904C226.1399,74.9174,229.3999,57.0654,229.3999,57.0654L224.9529,52.5244L224.6299,52.5244L219.1639,52.5244C219.1639,52.5244,218.8689,54.3924,218.6739,55.5654C217.5259,54.3224,215.8729,52.5244,215.8729,52.5244L209.9059,52.5244C209.9059,52.5244,213.3099,70.3384,213.3599,70.5954C213.3179,70.8564,210.1009,90.8754,210.1009,90.8754L216.4219,95.6904L220.1989,96.1364L220.1989,92.7614C221.7829,93.9984,225.3969,96.8104,225.3969,96.8104L230.3879,97.4974C230.3879,97.4974,226.1399,75.4674,226.0889,75.1904"
                                       Fill="#FF201D20"
                                       Height="44.973"
                                       Canvas.Left="173.906"
                                       Stretch="Fill"
                                       Canvas.Top="25.995"
                                       Width="20.482" />
                                            <Path Data="F1M183.915,83.2207L183.915,56.6427L179.565,52.5217L179.267,52.5217L173.722,52.5217L173.722,88.6987L178.359,92.7587L188.934,93.2827L188.695,88.5957C188.695,88.5957,184.978,84.4157,183.915,83.2207"
                                       Fill="#FF201D20"
                                       Height="40.761"
                                       Canvas.Left="137.722"
                                       Stretch="Fill"
                                       Canvas.Top="25.993"
                                       Width="15.212" />
                                            <Path Data="F1M120.501,60.543L125.037,60.543L125.037,56.663L120.707,52.513L120.403,52.513L110.296,52.522L110.296,90.151L114.864,93.748L125.037,93.112L125.037,88.949C125.037,88.949,120.858,84.323,120.501,83.927L120.501,77.2L125.099,77.2L125.099,73.005C125.099,73.005,120.901,68.806,120.501,68.401z"
                                       Fill="#FF201D20"
                                       Height="41.235"
                                       Canvas.Left="74.296"
                                       Stretch="Fill"
                                       Canvas.Top="25.984"
                                       Width="14.803" />
                                            <Path Data="F1M162.8887,60.541L167.4287,60.541L167.4287,56.661L163.0987,52.513L162.7947,52.513L152.6877,52.521L152.6877,88.447L157.3217,92.293L162.8887,92.332L162.8887,77.2L167.4907,77.2L167.4907,73.005C167.4907,73.005,163.2887,68.806,162.8887,68.401z"
                                       Fill="#FF201D20"
                                       Height="39.819"
                                       Canvas.Left="116.688"
                                       Stretch="Fill"
                                       Canvas.Top="25.984"
                                       Width="14.803" />
                                            <Path Data="F1M194.6523,88.9111C194.6523,88.9111,196.0643,88.9791,198.4803,89.1571L198.4803,53.5951L194.6523,53.6031z"
                                       Fill="#FFFEFEFE"
                                       Height="35.562"
                                       Canvas.Left="158.652"
                                       Stretch="Fill"
                                       Canvas.Top="27.066"
                                       Width="3.828" />
                                            <Path Data="F1M130.1016,57.147L134.2796,57.147L134.2796,88.083C134.2796,88.083,135.1746,88.013,138.1036,87.944L138.1226,57.155L142.3486,57.155L142.3486,53.606L130.1016,53.603z"
                                       Fill="#FFFEFEFE"
                                       Height="34.48"
                                       Canvas.Left="94.102"
                                       Stretch="Fill"
                                       Canvas.Top="27.074"
                                       Width="12.247" />
                                            <Path Data="F1M94.8989,84.165L94.6309,84.197L89.9589,53.606L83.7459,53.599L83.7499,91.997C83.7499,91.997,84.9819,91.82,87.6079,91.521L87.3399,62.334L87.6079,62.309L92.0469,91.065C92.0469,91.065,93.5679,90.885,98.7269,90.374L98.7269,53.603L94.7629,53.603z"
                                       Fill="#FFFEFEFE"
                                       Height="38.398"
                                       Canvas.Left="47.746"
                                       Stretch="Fill"
                                       Canvas.Top="27.07"
                                       Width="14.981" />
                                            <Path Data="F1M224.4482,53.5952L220.1292,53.5952L217.9582,67.3142L217.7012,67.3142L215.4462,53.5952L211.2052,53.5952L214.5192,70.5642L211.3182,90.4022L215.4412,90.7942L217.5612,74.4382L217.8172,74.4462L219.8812,91.2522L224.4012,91.7572L221.1682,71.0502z"
                                       Fill="#FFFEFEFE"
                                       Height="38.162"
                                       Canvas.Left="175.205"
                                       Stretch="Fill"
                                       Canvas.Top="27.066"
                                       Width="13.243" />
                                            <Path Data="F1M178.7832,53.5908L174.9372,53.5988L174.9372,87.9578C174.9372,87.9578,177.5472,88.0338,183.8382,88.3128L183.8382,84.8248C183.8382,84.8248,183.1372,84.7518,178.7832,84.6048z"
                                       Fill="#FFFEFEFE"
                                       Height="34.722"
                                       Canvas.Left="138.937"
                                       Stretch="Fill"
                                       Canvas.Top="27.062"
                                       Width="8.901" />
                                            <Path Data="F1M111.5103,89.334C111.5103,89.334,113.7823,89.179,120.3533,88.757L120.3533,85.245L115.3853,85.587L115.3853,73.286L120.3533,73.281L120.3533,69.704L115.3653,69.709L115.3653,57.15L120.3723,57.15L120.3723,53.599L111.5103,53.603z"
                                       Fill="#FFFEFEFE"
                                       Height="35.735"
                                       Canvas.Left="75.51"
                                       Stretch="Fill"
                                       Canvas.Top="27.07"
                                       Width="8.862" />
                                            <Path Data="F1M153.8984,87.6777L157.7764,87.6777L157.7764,73.2857L162.7454,73.2797L162.7454,69.7037L157.7564,69.7067L157.7564,57.1507L162.7644,57.1507L162.7644,53.5987L153.8984,53.6027z"
                                       Fill="#FFFEFEFE"
                                       Height="34.079"
                                       Canvas.Left="117.898"
                                       Stretch="Fill"
                                       Canvas.Top="27.07"
                                       Width="8.866" />
                                            <Path Data="F1M50.5337,105.6016L50.5107,105.6016C49.4947,105.6016,48.8217,106.2746,48.8217,107.0846C48.8217,107.8956,49.4837,108.5806,50.5107,108.5806L50.5337,108.5806C51.5497,108.5806,52.2227,107.8956,52.2227,107.0846C52.2227,106.2746,51.5497,105.6016,50.5337,105.6016 M50.5337,110.3156L50.5107,110.3156C48.4677,110.3156,47.3487,108.9796,47.3487,107.5306C47.3487,106.6056,47.7717,106.0356,48.2627,105.6236L45.2487,105.6236L45.2487,103.8896L53.5807,103.8896L53.5807,105.6236L52.7017,105.6236C53.2727,106.0466,53.6957,106.6286,53.6957,107.5306C53.6957,108.9566,52.5767,110.3156,50.5337,110.3156"
                                       Fill="#FFFEFEFE"
                                       Height="6.426"
                                       Canvas.Left="9.249"
                                       Stretch="Fill"
                                       Canvas.Top="77.361"
                                       Width="8.447" />
                                            <Path Data="F1M50.043,98.3193C49.267,98.4223,48.742,98.8793,48.742,99.6093C48.742,100.3283,49.255,100.7963,50.043,100.9333z M50.557,102.6333L50.534,102.6333C48.787,102.6333,47.349,101.3893,47.349,99.6093C47.349,97.5663,48.936,96.6313,50.67,96.6313C50.808,96.6313,50.967,96.6413,51.127,96.6533L51.127,100.9103C51.915,100.7393,52.326,100.1913,52.326,99.4153C52.326,98.8333,52.143,98.4113,51.698,97.9313L52.577,96.9383C53.284,97.5083,53.718,98.3313,53.718,99.4383C53.718,101.2753,52.428,102.6333,50.557,102.6333"
                                       Fill="#FFFEFEFE"
                                       Height="6.002"
                                       Canvas.Left="11.349"
                                       Stretch="Fill"
                                       Canvas.Top="70.102"
                                       Width="6.369" />
                                            <Path Data="F1M45.249,93.525L53.581,93.525L53.581,95.259L45.249,95.259z"
                                       Fill="#FFFEFEFE"
                                       Height="1.734"
                                       Canvas.Left="9.249"
                                       Stretch="Fill"
                                       Canvas.Top="66.996"
                                       Width="8.332" />
                                            <Path Data="F1M47.463,90.079L53.581,90.079L53.581,91.813L47.463,91.813z M45.249,90.033L46.79,90.033L46.79,91.859L45.249,91.859z"
                                       Fill="#FFFEFEFE"
                                       Height="1.826"
                                       Canvas.Left="9.249"
                                       Stretch="Fill"
                                       Canvas.Top="63.504"
                                       Width="8.332" />
                                            <Path Data="F1M47.4634,88.9941L47.4634,87.1571L51.5614,85.7871L47.4634,84.4061L47.4634,82.6021L53.6274,85.0111L53.6274,86.5861z"
                                       Fill="#FFFEFEFE"
                                       Height="6.392"
                                       Canvas.Left="11.463"
                                       Stretch="Fill"
                                       Canvas.Top="56.073"
                                       Width="6.164" />
                                            <Path Data="F1M50.043,77.9229C49.267,78.0259,48.742,78.4829,48.742,79.2129C48.742,79.9319,49.255,80.3999,50.043,80.5369z M50.557,82.2369L50.534,82.2369C48.787,82.2369,47.349,80.9929,47.349,79.2129C47.349,77.1699,48.936,76.2349,50.67,76.2349C50.808,76.2349,50.967,76.2449,51.127,76.2569L51.127,80.5139C51.915,80.3429,52.326,79.7949,52.326,79.0189C52.326,78.4369,52.143,78.0149,51.698,77.5349L52.577,76.5419C53.284,77.1119,53.718,77.9349,53.718,79.0419C53.718,80.8789,52.428,82.2369,50.557,82.2369"
                                       Fill="#FFFEFEFE"
                                       Height="6.002"
                                       Canvas.Left="11.349"
                                       Stretch="Fill"
                                       Canvas.Top="49.706"
                                       Width="6.369" />
                                            <Path Data="F1M47.4634,74.9443L47.4634,73.2103L48.6964,73.2103C47.8514,72.8563,47.3034,72.2853,47.3494,71.2573L49.1644,71.2573L49.1644,71.3493C49.1644,72.5023,49.8604,73.2103,51.3214,73.2103L53.5814,73.2103L53.5814,74.9443z"
                                       Fill="#FFFEFEFE"
                                       Height="3.687"
                                       Canvas.Left="11.347"
                                       Stretch="Fill"
                                       Canvas.Top="44.728"
                                       Width="6.235" />
                                            <Path Data="F1M50.043,66.3252C49.267,66.4282,48.742,66.8852,48.742,67.6152C48.742,68.3342,49.255,68.8022,50.043,68.9392z M50.557,70.6392L50.534,70.6392C48.787,70.6392,47.349,69.3952,47.349,67.6152C47.349,65.5722,48.936,64.6362,50.67,64.6362C50.808,64.6362,50.967,64.6472,51.127,64.6592L51.127,68.9162C51.915,68.7452,52.326,68.1972,52.326,67.4212C52.326,66.8392,52.143,66.4172,51.698,65.9372L52.577,64.9442C53.284,65.5152,53.718,66.3372,53.718,67.4442C53.718,69.2822,52.428,70.6392,50.557,70.6392"
                                       Fill="#FFFEFEFE"
                                       Height="6.003"
                                       Canvas.Left="11.349"
                                       Stretch="Fill"
                                       Canvas.Top="38.107"
                                       Width="6.369" />
                                            <Path Data="F1M50.5337,58.9067L50.5107,58.9067C49.4947,58.9067,48.8217,59.5797,48.8217,60.3897C48.8217,61.2007,49.4837,61.8857,50.5107,61.8857L50.5337,61.8857C51.5497,61.8857,52.2227,61.2007,52.2227,60.3897C52.2227,59.5797,51.5497,58.9067,50.5337,58.9067 M50.5337,63.6197L50.5107,63.6197C48.4677,63.6197,47.3487,62.2847,47.3487,60.8357C47.3487,59.9107,47.7717,59.3407,48.2627,58.9287L45.2487,58.9287L45.2487,57.1947L53.5807,57.1947L53.5807,58.9287L52.7017,58.9287C53.2727,59.3517,53.6957,59.9337,53.6957,60.8357C53.6957,62.2617,52.5767,63.6197,50.5337,63.6197"
                                       Fill="#FFFEFEFE"
                                       Height="6.425"
                                       Canvas.Left="9.249"
                                       Stretch="Fill"
                                       Canvas.Top="30.666"
                                       Width="8.447" />
                                            <Path Data="F1M50.5337,47.5269L50.5107,47.5269C49.4947,47.5269,48.8217,48.2119,48.8217,49.0229C48.8217,49.8329,49.4947,50.5059,50.5107,50.5059L50.5337,50.5059C51.5497,50.5059,52.2227,49.8329,52.2227,49.0229C52.2227,48.2119,51.5607,47.5269,50.5337,47.5269 M52.7827,50.4839L53.5807,50.4839L53.5807,52.2179L45.2487,52.2179L45.2487,50.4839L48.3427,50.4839C47.7717,50.0609,47.3487,49.4789,47.3487,48.5769C47.3487,47.1509,48.4677,45.7919,50.5107,45.7919L50.5337,45.7919C52.5767,45.7919,53.6957,47.1279,53.6957,48.5769C53.6957,49.5019,53.2727,50.0719,52.7827,50.4839"
                                       Fill="#FFFEFEFE"
                                       Height="6.426"
                                       Canvas.Left="9.249"
                                       Stretch="Fill"
                                       Canvas.Top="19.263"
                                       Width="8.447" />
                                            <Path Data="F1M55.019,44.8779L53.764,44.2959C53.9,44.0669,54.003,43.7819,54.003,43.5539C54.003,43.2569,53.912,43.0979,53.604,42.9489L47.463,45.3459L47.463,43.5079L51.629,42.1159L47.463,40.7799L47.463,38.9769L53.729,41.3279C54.974,41.7959,55.441,42.2979,55.441,43.3369C55.441,43.9649,55.282,44.4329,55.019,44.8779"
                                       Fill="#FFFEFEFE"
                                       Height="6.369"
                                       Canvas.Left="11.463"
                                       Stretch="Fill"
                                       Canvas.Top="12.448"
                                       Width="7.978" />
                              </Canvas>
                        </Viewbox>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
      <Grid.Background>
         <LinearGradientBrush StartPoint="0.5,0"
                              EndPoint="0.5,1">
            <GradientStop Color="#FF595959"
                          Offset="0" />
            <GradientStop Color="#FF383838"
                          Offset="1" />
         </LinearGradientBrush>
      </Grid.Background>

      <Grid.ColumnDefinitions>
         <ColumnDefinition Width="Auto" />
         <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>

      <StackPanel Orientation="Horizontal"
                  HorizontalAlignment="Center"
                  VerticalAlignment="Center"
                  Grid.Column="1">
         <TextBlock Text="The data for this sample is provided by "
                    Foreground="White" />
         <!-- The Hyperlink can't be used because not set the same way in
              Silverlight vs WPF. That's why we use a button and manage its click.-->
         <Button Style="{StaticResource HyperlinkCatalogButtonStyle}" 
                 Cursor="Hand"
                 DataContext="http://developer.netflix.com/docs/OData_Catalog"
                 Click="OnHyperlinkButton_Click" />
         <TextBlock Text="."
                    Foreground="White" />
      </StackPanel>

      <Grid  Grid.Column="0"
             Background="#7F000000">
            <!-- The Hyperlink can't be used because not set the same way in
                 Silverlight vs WPF. That's why we use a button and manage its click.-->
            <Button Style="{StaticResource HyperlinkLogoButtonStyle}"
                  Cursor="Hand" 
                  VerticalAlignment="Stretch"
                  HorizontalAlignment="Stretch"
                  Margin="10,18,10,10"
                  DataContext="http://www.netflix.com"
                  Click="OnHyperlinkButton_Click"/>
      </Grid>

   </Grid>
</UserControl>
